package cn.yang.domain.strategy.model.entity;

import cn.yang.domain.strategy.model.valobj.RuleLogicCheckTypeVO;
import lombok.*;

/**
 * @version v1.0
 * @ClassName: cn.yang.domain.strategy.model.entity
 * @Description: TODO
 * @Author: YJ
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public class RuleActionEntity<T extends RuleActionEntity.RaffleEntity> {
    private String code = RuleLogicCheckTypeVO.ALLOW.getCode();
    private String info = RuleLogicCheckTypeVO.ALLOW.getInfo();
    private String ruleModel;
    private T data;

    static public class RaffleEntity {


    }

    /**
     * 抽奖前
     */
    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    @Builder
    @EqualsAndHashCode(callSuper = true)
    static public class RaffleBeforeEntity extends RaffleEntity {
        /**
         * 抽奖策略ID
         */
        private Long strategyId;
        /**
         * 权重值key，用于抽奖时可以选择权重抽奖
         */
        private String ruleWeightValueKey;
        /**
         * 抽奖奖品ID
         */
        private Integer awardId;
    }

    /**
     * 抽奖中
     */
    static public class RaffleCenterEntity extends RaffleEntity {

    }

    /**
     * 抽奖后
     */
    static public class RaffleAfterEntity extends RaffleEntity {

    }
}
